# Make sure that the following is run:
# export LD_LIBRARY_PATH="/usr/local/lib"

CC = g++ -O3 

all: graph.o main.o graphreader.o randomgraphreader.o makeplot maketimes makestats
	$(CC) graph.o graphreader.o randomgraphreader.o main.o -lrt -lglpk -lm -o main 

graph.o: graph.h graph.cpp
	$(CC) -c graph.cpp

graphreader.o: graphreader.h graphreader.cpp
	$(CC) -c graphreader.cpp

randomgraphreader.o: randomgraphreader.h randomgraphreader.cpp
	$(CC) -c randomgraphreader.cpp

main.o: main.cpp
	$(CC) -c main.cpp

makeplot: makeplot.cpp
	$(CC) makeplot.cpp -o makeplot

maketimes: maketimes.cpp
	$(CC) maketimes.cpp -o maketimes

makestats: makestats.cpp
	$(CC) makestats.cpp -o makestats

clean:
	rm -rf main *.o